/*
 * Aboboo Android
 * Copyright (C) 2012 www.aboboo.com
 * 
 */

package com.aboboo.android.util;

import android.content.Context;
import android.widget.Toast;

/**
 * 
 * 改进Totst的显示，防止时间累加使得显示时间增加出现不停显示的情况
 * 
 * @author fangpeng
 * @version 1.0 2012-08-31
 * 
 */
public class ToastShow {
	private Context context;
	private Toast toast = null;

	public ToastShow(Context context) {
		this.context = context;
	}

	public void show(String message) {
		if (toast == null) {
			toast = Toast.makeText(context, message, Toast.LENGTH_SHORT);
		} else {
			toast.setText(message);
		}
		toast.show();
	}
}
